<template>
    <div class="delivergoods">
        <el-dialog v-model="open" title="DeliverGoods" width="78%" align="left" style="position: relative;" draggable>
            <div>
                <span>OrderID:{{ orderName }}</span>
                <span class="ml-20">Sales:Linda</span>
                <span class="ml-20">Money:$13680</span>
            </div>
            <el-radio-group v-model="radio" class="ml-4">
                <el-radio label="1" size="large"> Full delivery </el-radio>
                <el-radio label="2" size="large"> Partial delivery </el-radio>
            </el-radio-group>

            <el-table :data="list" height="400" style="width:100%;">
                <el-table-column type="selection" width="30" />
                <el-table-column fixed prop="model" label="Model" />
                <el-table-column prop="brand" label="Brand" />
                <el-table-column prop="price" label="Price" />
                <el-table-column prop="qty" label="Qty 数量" />
                <el-table-column prop="hqty" label="HQty 已" />
                <el-table-column v-if="radio == '2'" prop=" pqty" label="PQty 部">
                    <template v-slot="pqty">
                        <el-input v-model="pqty.row.pqty" placeholder="请输入发货数量" />
                    </template>
                </el-table-column>
                <el-table-column prop="purcharse" label="Purchaser" />
                <el-table-column prop="amount" label="Amount" />
                <el-table-column prop="weight" label="Weight" />

                <el-table-column prop="leading" label="Leading Time" />
                <el-table-column prop="state" label="State" />
            </el-table>
            <template #footer>
                <span class="dialog-footer">
                    <el-button type="primary" style="border:1px solid #6193D2;color:#ffffff">confirm</el-button>
                    <el-button
                        style="border:1px solid #6193D2;background-color:#ffffff;color:#6193D2">Cancel</el-button>
                </span>
            </template>
        </el-dialog>
    </div>

</template>
  
<script  setup>

import { ref } from 'vue'
const emits = defineEmits()
const props = defineProps({
    orderName: String
})
const open = ref(false)
const radio = ref('1')
const dialogopen = () => {
    open.value = true
}
const list = ref([{
    model: "FS-CIF13",
    brand: "other",
    price: "$123",
    qty: 12,
    hqty: 3,
    pqty: '',
    purcharse: 'Liu',
    amount: 123,
    weight: 31234,
    leading: '1weeks',
    state: '未订货'
}])
defineExpose(
    {
        open,

        dialogopen
    }
)
</script>
<style lang="less">
.delivergoods {
    .el-dialog__body {
        padding-top: 5px;
    }
}
</style>